<admintpl file="header" />
<body class="J_scroll_fixed">
<div class="wrap js-check-wrap">
  <form class="js-ajax-form" action="" method="post">
      <table width="100%" class="table table-hover">
        <thead>
	          <tr>
	            <th width="40">ID</th>
	            <th>所属课程</th>
	            <th width="130"><span>发布时间</span></th>
	            <th width="100">操作</th>
	          </tr>
        </thead>
        	<foreach name="sectionlist" item="vo">
	        	<tr>
		            <td><a>{$vo.id}</a></td>
                    <td>{$vo.cs_name} </td>
		            <td>{$vo.addtime}</td>
		            <td>
		                <div class="btn-group">
                           <button type="button" class="btn btn-default">管理</button>
                           <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
                             <span class="caret"></span>
                             <span class="sr-only"></span>                             
                           </button>                          
                           <ul class="dropdown-menu pull-right" role="menu" >
                               <!--<li><a href="javascript:open_iframe_dialog('{:u('course/AdminSection2/edit',array('id'=>$vo['id']))}','编辑课时')">编辑</a></li>-->
                               <li><a href="{:u('course/AdminSection2/edit',array('id'=>$vo['id']))}" target="_blank">编辑</a></li>
                             <li><a href="{:U('AdminSection2/delete',array('id' => $vo['id']))}" class="js-ajax-delete" >删除</a></li>
                           </ul>
                          </div>
					</td>
	          	</tr>
          </foreach>
          <thead>
	          <tr>
                  <th width="40">ID</th>
                  <th>所属课程</th>
                  <th width="130"><span>发布时间</span></th>
                  <th width="100">操作</th>
	          </tr>
          </thead>
          </table>
          <div class="pagination">{$page}</div>
  </form>
</div>
<script src="__PUBLIC__/js/common.js"></script>
<script>

function refersh_window() {
    var refersh_time = getCookie('refersh_time');
    if (refersh_time == 1) {
        window.location="{:u('AdminCourse/index',$formget)}";
    }
}
setInterval(function(){
	refersh_window();
}, 2000);
$(function () {
	setCookie("refersh_time",0);
    Wind.use('ajaxForm','artDialog','iframeTools', function () {
        //批量移动
        $('#J_Content_remove').click(function (e) {
            var str = 0;
            var id = tag = '';
            $("input[name='ids[]']").each(function () {
                if ($(this).attr('checked')) {
                    str = 1;
                    id += tag + $(this).val();
                    tag = ',';
                }
            });
            if (str == 0) {
				art.dialog.through({
					id:'error',
					icon: 'error',
					content: '您没有勾选信息，无法进行操作！',
					cancelVal: '关闭',
					cancel: true
				});
                return false;
            }
            var $this = $(this);
            art.dialog.open("__ROOT__/index.php?g=course&m=AdminSection&a=move&ids=" + id, {
                title: "批量移动",
                width:"80%"
            });
        });
    });
});


</script>
</body>
</html>